{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "higher-german",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "plt.plot(np.random.normal(loc=10, scale=1000, size=(100,)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "unable-official",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2. np.random是伪随机，根据seed值做运算，确定了seed，每次都是一样的\n",
    "np.random.seed(1234)\n",
    "a = np.random.randn(10)\n",
    "\n",
    "np.random.seed(1234)\n",
    "b = np.random.randn(10)\n",
    "print(a)\n",
    "print(b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "institutional-russian",
   "metadata": {},
   "outputs": [],
   "source": [
    "dir(np.random)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "surface-highlight",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-3\n",
      "43\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7fae2bec8790>]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO2dd3xb5bnHf69syZY8JK84w0mckL0TQgZhhISEkZQUSBmlJazC7YIOKFBKuS23kMJtgQJNoVCg3LDKLrNJCDsbyN6JnR07tiU7lmzJ0nv/OEPnHB0tW+tIz/fz8cc6Q9JzdKTfec/zPoNxzkEQBEEYD1O6DSAIgiC6Bwk4QRCEQSEBJwiCMCgk4ARBEAaFBJwgC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HcB+rd3ZfJ4B9ANwEEC5eN7eAXBeNp5nALUAtnT3vAK4EsATivWq/aL9ZfwIHMEvg8QhcV3WIN4yTgSwBkA15/youOkYgGrxcbZ8Dg8D+BWAgLhcAcDJOe8Sl5XHJR+zuN0l7m8kBgFoBPCM6DZ6ijFWhCw+z5zzwwD+F8ABAEchnLcNyO7zLBHvee3R+TaCgGc1jLFiAK8B+BnnvFW5jQuX5KyJ82SMzQfQwDnfkG5bUkg+gEkAlnDOJwJoR/C2GkBWnucyAAsgXLz6AihCqKsh60nFeTWCgB8GoGwrXyOuMzyMMTME8V7KOX9dXH2cMdZH3N4HQIO4Phs+hxkALmKM1QF4CYIb5READsZYvriP8rjkYxa32wE0pdLgBHAIwCHO+Rpx+VUIgp7N5/lcAPs5542ccx+A1yGc+2w+zxLxntcenW8jCPg6AEPFGWwLhMmQt9NsU49hjDEATwPYzjn/s2LT2wCkmehFEHzj0vqrxdnsaQBcils1Q8A5v5NzXsM5r4VwHj/inF8FYCWAheJu2mOWPouF4v6GGqlyzo8BOMgYGy6umg1gG7L4PENwnUxjjNnE77l0zFl7nhXEe14/BDCXMVYm3rnMFdfFRronAWKcKLgQwC4AewHclW57EnRMZ0C4vdoE4Bvx70IIvr8VAHYDWA6gXNyfQYjG2QtgM4QZ/rQfRw+OfyaAd8THgwGsBbAHwL8AFIjrC8XlPeL2wem2u5vHOgHAevFcvwmgLNvPM4DfAdgBYAuA5wEUZNt5BvAiBB+/D8Kd1vXdOa8ArhOPfQ+Aa+OxgVLpCYIgDIoRXCgEQRCEDiTgBEEQBoUEnCAIwqCQgBMEQRgUEnCCIAiDQgJOEARhUEjACYIgDMr/A7HdT2jG66wuAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 1. 价格或者上升，或者下降，是随机的。模拟1000次股票波动的曲线。\n",
    "draws = np.random.randint(0,2, size=1000)\n",
    "moves = np.where(draws > 0, 1, -1)\n",
    "walk = moves.cumsum()\n",
    "print(walk.min())\n",
    "print(walk.max())\n",
    "import matplotlib.pyplot as plt\n",
    "plt.plot(walk)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "saving-newspaper",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
